package com.atguigu.mybatisplus;

import com.atguigu.mybatisplus.entity.User;
import com.atguigu.mybatisplus.mapper.UserMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@SpringBootTest
@RunWith(SpringRunner.class)
public class test7 {
    @Autowired
    UserMapper userMapper;
    @Test
    public void test(){
        IPage<User> iPage = new Page<>();
        iPage.setCurrent(1);
        iPage.setSize(5);
        IPage<User> userIPage = userMapper.selectPage(iPage, null);
        System.out.println(userIPage);
    }
}
